package com.devbobcorn.nekoration.client.event;

import com.devbobcorn.nekoration.Nekoration;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import net.minecraft.client.audio.SoundEngine;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.client.event.sound.SoundLoadEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;

@EventBusSubscriber(modid = Nekoration.MODID, bus = EventBusSubscriber.Bus.FORGE, value = Dist.CLIENT)
public class ClientForgeEventSubscriber {
    private static final Logger LOGGER = LogManager.getLogger("Client Forge Event Subscriber");

    public static SoundEngine soundEngine = null;

    @SubscribeEvent
    public static void onSoundLoad(SoundLoadEvent event) {
        if (event.getManager() != null){
            LOGGER.debug("Sounds loaded.");
            soundEngine = event.getManager();
        }
    }
}
